<%-- 
    Document   : opnemenAnder
    Created on : 11-apr-2009, 19:47:02
    Author     : frankkie
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="bank.css" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <%
      if (pin.Database.antiRechtsklik){out.println(pin.Header.rechtsKlikBeveiliging);}
      boolean alleenAlsPinGoed = true;
          if (alleenAlsPinGoed) {
            if (session.getAttribute("pincodeGoed") == null || !session.getAttribute("pincodeGoed").equals("ja")) {
              //Is NIET goed...
              response.sendRedirect("index.jsp");
            }
          }
          %>
    <title>Lucky Bank - Ander bedrag opnemen</title>
    <script type="text/javascript">
      <!--
      function knop(nummer){
        //getal toeveogen
        document.getElementById("codeVeld").value=document.getElementById("codeVeld").value+nummer;
      }

      function submitte(){
        document.formu.submit();
      }

      function correctie(){
        //Leeg maken
        document.getElementById("codeVeld").value = "";
      }

      function stop(){
        //Gebruiker wil pas terug
        location.href="stop.jsp";
      }

      function terugNaarMenu(){
        //Gebruiker wil pas terug
        location.href="menu.jsp";
      }
      //-->
    </script>
  </head>
  <body>
    <table width="100%" border="0">
       <%out.println(pin.Header.header);%>
      </td></tr></table>
      <!-- Einde Logo //-->
    <h2>Ander Bedrag Opnemen</h2>
    Vul maar wat in....<br />
    <%
          if (request.getParameter("a") != null) {
            //Er is iets mis
            if (request.getParameter("a").equals("S")){
              double saldo = pin.Saldo.kijk((String)session.getAttribute("banknummer"),(String)session.getAttribute("rekeningnummer"));
          //out.println("Uw Saldo bedraagt:\n&euro;" + saldo + "0");
              out.println("Saldo te laag<br />(saldo: &euro;" + saldo + "0)");
            }
            if (request.getParameter("a").equals("V")){
              out.println("Niet deelbaar door 5");
            }
            if (request.getParameter("a").equals("F")){
              out.println("Geen correct getal");
            }
            if (request.getParameter("a").equals("L")){
              out.println("Bedrag te Laag");
            }
            out.println("<br />");
          }
    %>
    <form method="post" name="formu" action="opnemenBedragCheck.jsp">
      <!-- FF Nakijken iemand ! //-->
      <div class="groot" align="center" ><input class="groot" type="text" name="bedrag" maxlength="10" size="10" id="codeVeld" /></div>
      <br />
      <input type="button" class="knop" onclick="terugNaarMenu()" value="Terug" /><input type="button" class="knop" onclick="submitte()" value="Ok" />
    </form>
    <!-- Knoppen //-->
    <div align="center">
      <!-- 2 knoppen//-->
      <table><tr><td><input type="button" class="knop" onclick="correctie()" value="Correctie"><input type="button" class="knop" onclick="stop()" value="Stop"></table>
      <!-- Getallen //-->

      <table>
        <tr><td><input type="button" class="knop" onclick="knop('1')" value="1"><td><input type="button" class="knop" onclick="knop('2')" value="2"><td><input type="button" class="knop" onclick="knop('3')" value="3">
        <tr><td><input type="button" class="knop" onclick="knop('4')" value="4"><td><input type="button" class="knop" onclick="knop('5')" value="5"><td><input type="button" class="knop" onclick="knop('6')" value="6">
        <tr><td><input type="button" class="knop" onclick="knop('7')" value="7"><td><input type="button" class="knop" onclick="knop('8')" value="8"><td><input type="button" class="knop" onclick="knop('9')" value="9">
        <tr><td><td><input type="button" class="knop" onclick="knop('0')" value="0"><td>
    </table></div>
  </body>
</html>
